package com.web.ShoppingDemo.serviceImpl;


import javax.annotation.Resource;

import net.sf.json.JSONSerializer;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import com.web.ShoppingDemo.service.SorderService;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations="classpath:applicationContext-*.xml")
public class SorderServiceImplTest {
	@Resource
	private SorderService sorderService;

	@Test
	public void testQuerySale() {
		/*System.out.println(sorderService.querySale(3));
		for(Object o:sorderService.querySale(5)){
			System.out.println(o);
		}*/
		System.out.println(JSONSerializer.toJSON(sorderService.querySale(5)));
	}

}
